﻿#pragma once

#include "common.h"
#include "seqbase/store.h"
#include "base.h"

namespace anip
{
	class Shape;
	class Shader;
	class Texture2D;

	namespace vg
	{
		class Image : public Primitive, public DataStore::ReferenceOwner
		{
			serializable_id(Image, 0xB77693);

		private:
			class Renderer;

		public:
			STexture2D::Reference texture{ *this };
			kvec2 position, size;
			kcolor tint = Colors::white;

			Image(vec2 pos = { 0, 0 }, vec2 s = { 0, 0 });
			~Image();

			bool isInside(invec2 p, float time) override;
			GraphicsRenderer* createRenderer() override;
		};
	}
}